January 17, 2018
linear \(\Rightarrow\) non-linear
additive \(\Rightarrow\) interactions
theory-driven \(\Rightarrow\) optimization-driven
You want to predict wine quality from its physicochemical properties.
Free dataset of red and white variants of the Portuguese “Vinho Verde” wine from the Minho (northwest) region of Portugal.
Three sensory assessors (using blind tastes), which graded the wine in a scale that ranges from 0 (very bad) to 10 (excellent)
P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis. Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 2009.
Compare different models with 10x CV - Linear regression model - Decision tree - Random forest
| learner.id | mae.test.mean |
|---|---|
| regr.ranger | 0.4353923 |
| regr.lm | 0.5696394 |
| regr.rpart | 0.6015873 |
=> The random forest (ranger) is the best model.
Client: “We would love to learn some insights.”
Looking inside the black box
TODO: Slide explaining permutation feature importance
TODO: Slide explaining ALE plots
Method: Accumulated Local Effects
Method: Accumulated Local Effects
The tree explains 37.36% of the black box prediction variance.
TODO: Image of really bad wine
Predicted quality: 3.7628
TODO: Slide to explain Shapley value
TODO: Slide to explain counterfactuals
How do we get the wine above predicted quality of 5?
## type fixed.acidity volatile.acidity citric.acid residual.sugar ## 5589 red 7.4 1.185 0 4.25 ## chlorides free.sulfur.dioxide total.sulfur.dioxide density pH ## 5589 0.097 5 14 0.9966 3.63 ## sulphates alcohol quality ## 5589 0.54 10.7 3
## [1] 5.092067
## [1] 5.006533
TODO: Image
TODO: Overview (drawing)
IF \(90m^2\leq \text{size} < 110m^2\) AND location \(=\) “good” THEN rent is between 1540 and 1890 EUR
TODO: Example for CNNs
TODO: Example for text (RNNs and attention?)
TODO: Drawing of feature effect
TODO: Drawing of importance
TODO: Graphic for counterfactuals
TODO: Graphic for prototypes
More on interpretable machine learning in my book http://christophm.github.io/interpretable-ml-book/.